#include "RestartZigbeeCmd.h"

RestartZigbeeCmd::RestartZigbeeCmd(QObject *parent) :
    BaseCmd(parent)
{
    this->m_protocolType = ProtocolType::ZigbeeConfigProtocol;
    this->m_functionCode = FunctionCode;
}

Package RestartZigbeeCmd::toPackage()
{
    Package package;
    package.setFunction(FunctionCode);
    return package;
}

void RestartZigbeeCmd::unPackage(Package package)
{
    QByteArray body = package.body();
    m_isSucceed = body.mid(0,1).toHex().toUInt();
}
bool RestartZigbeeCmd::isSucceed() const
{
    return m_isSucceed;
}

void RestartZigbeeCmd::setIsSucceed(bool isSucceed)
{
    m_isSucceed = isSucceed;
}

